{include file="public/header" /}





<div class="page">
    <div class="fixed-bar">
        <div class="item-title">
            <div class="subject">
                <h3>{$Think.lang.goods_category}</h3>
            </div>
            {include file="public/admin_items" /}
        </div>
    </div>
   
   
       <form method="get" name="formSearch" id="formSearch">
        <div class="ds-search-form">
            <!-- <dl>
                <dt><label>{$Think.lang.course_status}</dt>
                <dd>
                    <select name="stauts">
                        <option value="">{$Think.lang.ds_please_choose}...</option>
                        <option value="0" >{$Think.lang.goods_class_index_display}</option>
                        <option value="1" >{$Think.lang.goods_class_index_hide}</option>
                    </select>
                </dd>
            </dl> -->
            <!-- <dl>
                <dt>{$Think.lang.course_brand}</dt>
                <dd>
                    <select name="brand_id">
                        <option value="">{$Think.lang.ds_please_choose}...</option>
                        {notempty name="brand"}
                        {foreach name="brand" item="v"}
                        <option value="{$v.brand_id}" >{$v.brand_name}</option>
                        {/foreach}
                        {/notempty}
                    </select>
                </dd>
            </dl> -->
            <dl>
                <dt>{$Think.lang.goods_category_name}</dt>
                <dd><input type="text"  name="category_name" id="store_name" class="txt"></dd>
            </dl>
            <div class="btn_group">
                <dd><input type="submit" class="btn" value="{$Think.lang.ds_search}"></dd>
                <a href="{:url('Goodscategory/index')}" class="btn btn-default" title="{$Think.lang.ds_cancel}">{$Think.lang.ds_cancel}</a>
            </div>
        </div>
    </form>
   
      <table class="ds-default-table">
      <thead>
        <tr class="thead">
          <th>{$Think.lang.goods_category_name}</th>
          <th>{$Think.lang.goods_category_status}</th>
          <th>{$Think.lang.course_set}</th>
        </tr>
      </thead>
      <tbody>
        {notempty name="course_list"}
        {foreach name="course_list" item="v" key="k" }
        <tr class="hover edit" id="ds_row_{$v.id}">
          <td class="">
          <span>{$v.category_name}</span>
          <a class="btn-add-nofloat marginleft" href="{:url('Goodscategory/add_son_category',['id'=>$v.id])}"><span>{$Think.lang.ds_add_sub_category}</span></a>
          </td>
          <td>
            {if condition="$v.status eq 1"} 
              下架
            {else/}
              上架  
            {/if}
          </td>
          <td> 
              <a href="{:url('Goodscategory/category_son_list',['id'=>$v.id])}">{$Think.lang.ds_course_ch}</a> |
              {if condition="$v.status eq 0"} 
              <a href="{:url('Goodscategory/lower',['id'=>$v.id])}">
              {$Think.lang.ds_add_sub_xia}|</a> 
              {/if}
              <a href="{:url('Goodscategory/category_class_edit',['id'=>$v.id])}">{$Think.lang.ds_edit}</a> | 
              <a href="javascript:dsLayerConfirm('{:url('Goodscategory/category_class_del',['id'=>$v.id])}','{$Think.lang.ds_ensure_del}',{$v.id})">{$Think.lang.ds_del}</a>
          </td>
        </tr>        
        {/foreach}
        {else /}
        <tr class="no_data">
          <td colspan="10">{$Think.lang.ds_no_record}</td>
        </tr>
        {/notempty}
      </tbody>
    </table>
</div>

<script type="text/javascript" src="{$Think.ADMIN_SITE_ROOT}/js/jquery.edit.js" charset="utf-8"></script>
<script src="{$Think.ADMIN_SITE_ROOT}/js/jquery.goods_class.js"></script>
<script type="text/javascript">
    function submit_delete(ids_str){
        _uri = ADMINSITEURL+"/Course/goods_class_del.html?gc_id=" + ids_str;
        dsLayerConfirm(_uri,'{$Think.lang.ds_ensure_del}');
    }
</script>